import React from 'react';
import {text} from "../../recoils/atoms";
import {useRecoilValue} from "recoil";

function ComponentA() {

    const getText = useRecoilValue(text);
    console.log('--useRecoilValue in recoil--')


    return (<div className="form-group border">
        <h3>useRecoilValue in recoil</h3>
        <div className="form-group">
            <span className="text-primary">useRecoilValue: </span>
            <strong>{getText}</strong>
        </div>
    </div>)
}

export default React.memo(ComponentA);